package com.xzit.test;

/**
 * @author haoranlu
 * @project IntelliJ IDEA
 */

public class Student {
    private String name;
    private String sex;
    private short age;

    public Student(String name, String sex, short age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public short getAge() {
        return age;
    }

    public void setAge(short age) {
        this.age = age;
    }

    public static void main(String[] args) {
        /*Student stu1 = new Student("张梓彤","男", (short) 0);
        Student stu2 = new Student("李子文","女", (short) 15);
        System.out.println("姓名:"+stu1.name+",性别:"+stu1.getSex()+",年龄:"+ stu1.getAge());
        System.out.println("姓名:"+stu2.name+",性别:"+stu2.getSex()+",年龄:"+ stu2.getAge());*/

        Student stu1 = new Student();
        stu1.setName("李子通");
        stu1.setSex("男");
        stu1.setAge((short) 0);
        System.out.println("姓名:"+stu1.name+",性别:"+stu1.getSex()+",年龄:"+ stu1.getAge());

        Student stu2 = new Student();
        stu2.setName("李子文");
        stu2.setSex("女");
        stu2.setAge((short) 15);
        System.out.println("姓名:"+stu2.name+",性别:"+stu2.getSex()+",年龄:"+ stu2.getAge());

    }




}
